<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';

// 获取当前页面对应的路由对象
const route = useRoute()
const search = ref('')

search.value = route.params.words as string

</script>

<template>
    <div class="search">
        <p>搜索关键字: {{ search }}</p>
        <p>搜索结果: </p>
        <ul>
            <li>.............</li>
            <li>.............</li>
            <li>.............</li>
            <li>.............</li>
        </ul>
    </div>
</template>